package com.khyr.feign;

import com.khyr.entity.CareOrder;
import com.khyr.entity.Menu;
import com.khyr.entity.User;
import com.khyr.vo.R;

import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author zr
 */
@Component
public class UserFallbackFactory implements FallbackFactory<ChargeManagementFeign> {
    @Override
    public ChargeManagementFeign create(Throwable cause) {
        return new ChargeManagementFeign() {
            @Override
            public R<List<CareOrder>> getCareOrderByRegId(String regId) {
                return new R<List<CareOrder>>(500,"服务器故障",null);
            }
        };
    }
}
